{% extends 'kingadmin/index.html' %}
{% load kingadmin_tags %}

{% block right-content-container %}
    <h2 class="page-header">KingAdmin</h2>
    <div>
    {% for app_name,app_tables in site.enable_admins.items %}
        <table class="table table-bordered">
            <thead>
            <tr style="background-color:#79aec8;">
                <th colspan="3"><a href="{% url 'kingadmin:app_model_index' app_name %}" style="color: white">{{ app_name|upper }}</a></th>
            </tr>
            </thead>
            <tbody>
            {% for model_name in app_tables %}
                <tr>
                    <td class="col-md-8"><a href="{% url 'kingadmin:table_obj_list' app_name model_name %}">{% get_model_verbose_name_plural site app_name model_name %}</a></td>
                    <td class="col-md-2"><a href="{% url 'kingadmin:table_obj_add' app_name model_name %}"><i class="fa fa-plus-square" style="color: green" aria-hidden="true"></i>&nbsp;&nbsp;add</a></td>
                    <td class="col-md-2"><a href="{% url 'kingadmin:table_obj_list' app_name model_name %}"><i class="fa fa-pencil" style="color: gold"></i>&nbsp;&nbsp;change</a></td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    {% endfor %}
    
    </div>
{% endblock %}